﻿using System.Net;
using UtilZ.Dotnet.Ex.Communication.Net.Base;

namespace UtilZ.Dotnet.Ex.Communication.Net.BMQ
{
    /// <summary>
    /// BMQ订阅者配置
    /// </summary>
    public class BMQSubscriberConfig
    {
        /// <summary>
        /// 通信协议，默认uudp
        /// </summary>
        public NetProtocols Protocol { get; set; } = NetProtocols.Udp;

        /// <summary>
        /// udp协议时，本地接收数据绑定EndPoint,当使用tcp协议时若不为null则为本地绑定EndPoint
        /// </summary>
        public EndPoint SubscriberEndPoint { get; set; }

        /// <summary>
        /// 发布者EndPoint
        /// </summary>
        public EndPoint PublisherEndPoint { get; set; }

        /// <summary>
        /// 操作超时时长，单位：毫秒
        /// </summary>
        public int TimeoutMilliseconds { get; set; } = 1000;

        /// <summary>
        /// 心跳间隔时长，单位：毫秒
        /// </summary>
        public int HeartIntervalMilliseconds { get; set; } = 1000;




        /// <summary>
        /// 构造函数
        /// </summary>
        public BMQSubscriberConfig()
            : base()
        {

        }
    }
}
